io.sh
#!/bin/bash
datetime=`date +'%Y-%m-%d %H:%M:%S'`
io_info=`iostat -xm|grep sda`
echo $datetime $io_info >> /root/io.log

cpu.sh
#!/bin/bash
datetime=`date +'%Y-%m-%d %H:%M:%S'`
cpu_info=`top -b -n 1 | grep Cpu`
echo $datetime $cpu_info >>  /root/cpu.log


mem.sh
#!/bin/bash
datetime=`date +'%Y-%m-%d %H:%M:%S'`
mem_info=`free -m | grep Mem`
echo $datetime $mem_info >> /root/mem.log



io.sh
#!/bin/bash
datetime=`date +'%Y-%m-%d %H:%M:%S'`
io_info=`iostat -xm|grep sda`
echo $datetime $io_info >> /home/omm/io.log

cpu.sh
#!/bin/bash
datetime=`date +'%Y-%m-%d %H:%M:%S'`
cpu_info=`top -b -n 1 | grep Cpu`
echo $datetime $cpu_info >>  /home/omm/cpu.log


mem.sh
#!/bin/bash
datetime=`date +'%Y-%m-%d %H:%M:%S'`
mem_info=`free -m | grep Mem`
echo $datetime $mem_info >> /home/omm/mem.log

while :; do sh io.sh; done
while :; do sh cpu.sh; done
while :; do sh mem.sh; done